/**
 * Created by solaman on 2017/5/4.
 */
Vue.component('task-list', {
    template:
    `<ul>
        <task v-for="task in tasks">{{ task.task }}</task>
    </ul>
    `,
    data() {
        return {
            tasks:[
                {task:'Go to the store', completed: true},
                {task:'Go to work', completed: false},
                {task:'Go to school', completed: true},
                {task:'Make dinner', completed: false}
            ]
        };
    }
})

Vue.component('task', {
    template: '<li><slot></slot></li>'
})
let app = new Vue({
    el: '#root'
})